package com.lagou.edu.service.impl;

import com.lagou.edu.pojo.Article;
import com.lagou.edu.repository.ArticleRepository;
import com.lagou.edu.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * @author xsl
 * @date 2020/8/16 20:19
 * @Description: ArticleServiceImpl
 */
@Service("articleService")
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    private ArticleRepository articleRepository;

    @Override
    public Page<Article> findAll(PageRequest request) {
        return articleRepository.findAll(request);
    }
}
